#include "llib_version.h"
#define L_VERSION   1111225
#if L_VERSION == LLIB_VERSION_TO_TEST

#include <boost/test/unit_test.hpp>
using namespace boost;

#include <llib.h>
using namespace llib;
using namespace llib::geom;

BOOST_AUTO_TEST_SUITE(TriPairTester_test_suite)

BOOST_AUTO_TEST_CASE(static_test_case)
{
    Tri3f t00(Vec3f(0.f,1.f,1.f),Vec3f(0.f,1.f,0.f),Vec3f(1.f,0.f,1.f));
    Tri3f t01(Vec3f(0.f,0.f,0.f),Vec3f(1.f,1.f,0.f),Vec3f(1.f,1.f,1.f));
    BOOST_CHECK_EQUAL( TriPairTester::TestStatic(t00,t01), TRUE );

    t01[2].z = 1.5f;
    BOOST_CHECK_EQUAL( TriPairTester::TestStatic(t00,t01), TRUE );

    t01[2].z = 0.5f;
    BOOST_CHECK_EQUAL( TriPairTester::TestStatic(t00,t01), FALSE );

    Tri3f t02(Vec3f(0.f,0.5f,0.f),Vec3f(1.f,0.5f,0.f),Vec3f(1.f,0.5f,1.f));
    BOOST_CHECK_EQUAL( TriPairTester::TestStatic(t00,t02), TRUE );

    t02[2].z = 0.5f;
    BOOST_CHECK_EQUAL( TriPairTester::TestStatic(t00,t02), FALSE );

    t02[2].z = 2.f;
    BOOST_CHECK_EQUAL( TriPairTester::TestStatic(t00,t02), TRUE );
}

BOOST_AUTO_TEST_CASE(dynamic_test_case)
{

}

BOOST_AUTO_TEST_SUITE_END()

#endif
